/**
 * 权限管理api
 */

import request from '@/utils/request'
/**
* @description 获取所有的权限点
* @param {Object} 要更新的参数对象
* @return: promise
*/

export const queryAllPermissions = () => request.get(`/sys/permission`)

/**
* @description 根据ID更新权限点详情
* @param {Object} 要更新的参数对象
* @return: promise
*/

export const updatePermissionById = data => request.put(`/sys/permission/${data.id}`, data)

/**
* @description:根据ID获取权限点详情
* @param {String} id值
* @return: promise
*/
export const queryPermissionINfoById = id => request.get(`/sys/permission/${id}`)

/**
* @description:
* @param {String} 根据id删除权限点
* @return:
*/
export const deletePermissionById = id => request.delete(`/sys/permission/${id}`)

/**
* @description:添加权限点
* @param {type}
* @return:
*/
export const addPermission = data => request.post(`/sys/permission`, data)

